﻿using CommandPattern.Devices;
using CommandPattern.Abstractions;


namespace CommandPattern.Commands
{
    public class AirConditionerCloseCommand : ICommand
    {
        private AirConditioner airConditioner;
        public AirConditionerCloseCommand(AirConditioner airConditioner)
        {
            this.airConditioner = airConditioner;
        }
        public void Execute()
        {
            airConditioner.Close();
        }

        public void Undo()
        {
            airConditioner.Open();
        }
    }
}
